Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preliminary date comparison methods #65

Merged
merged 6 commits into from
Apr 25, 2024
Merged

Conversation

rlskoeser
Copy link
Member

@rlskoeser rlskoeser commented Oct 27, 2023

  • improved equality check, including support for comparing Undate object with day precision to datetime.date
  • implementations for __lt__ , __le__, and __contains__
  • tests for comparison, sorting and in (contains)
  • static method to initialize an Undate object from a datetime.date, to simplify comparison logic

I'm sure there are cases I'm not handling or assumptions I'm making that don't always hold, so please point out any you can think of and then we can decide whether to fix as part of this PR or create separate issues for additional cases.

@rlskoeser rlskoeser changed the title implement date comparison methods preliminary date comparison methods Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #65 (fcdd4c2) into develop (ab378da) will increase coverage by 0.27%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #65      +/-   ##
===========================================
+ Coverage    98.65%   98.92%   +0.27%     
===========================================
  Files            4        4              
  Lines          223      280      +57     
===========================================
+ Hits           220      277      +57     
  Misses           3        3              
Files Coverage Δ
tests/test_dateformat/test_base.py 100.00% <100.00%> (ø)
tests/test_undate.py 100.00% <100.00%> (ø)

@rlskoeser rlskoeser merged commit 1cef86b into develop Apr 25, 2024
7 checks passed
@rlskoeser rlskoeser deleted the feature/5-date-comparisons branch April 25, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant